package com.glsc.ngateway.common.base.domain.postgre6;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

@Data
@Entity
@Table(name = "t_excel_irs_gtja_ydccmxb")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@IdClass(GtjaIRS.PK.class)
public class GtjaIRS {
    public static class PK implements Serializable {
        private String ywyf;
        private String jgmc;
        private String jybm;

        public String getYwyf() {
            return ywyf;
        }

        public void setYwyf(String ywyf) {
            this.ywyf = ywyf;
        }

        public String getJgmc() {
            return jgmc;
        }

        public void setJgmc(String jgmc) {
            this.jgmc = jgmc;
        }

        public String getJybm() {
            return jybm;
        }

        public void setJybm(String jybm) {
            this.jybm = jybm;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            PK pk = (PK) o;
            return Objects.equals(ywyf, pk.ywyf) && Objects.equals(jgmc, pk.jgmc) && Objects.equals(jybm, pk.jybm);
        }

        @Override
        public int hashCode() {
            return Objects.hash(ywyf, jgmc, jybm);
        }
    }

    public GtjaIRS(){

    }

    public GtjaIRS(String ywyf,String jgmc,String jybm,String jypz,Double mybj,String gxzff,String fxzff,String jycjr,String jyqxr,
                   String jydqr,String gxll,String zfzq,Double lc){
        this.ywyf = ywyf;
        this.jgmc = jgmc;
        this.jybm = jybm;
        this.jypz = jypz;
        this.mybj = mybj;
        this.gxzff = gxzff;
        this.fxzff = fxzff;
        this.jycjr = jycjr;
        this.jyqxr = jyqxr;
        this.jydqr = jydqr;
        this.gxll = gxll;
        this.zfzq = zfzq;
        this.lc = lc;
    }

    @Id
    @Column(name = "ywyf")
    private String ywyf;

    @Id
    @Column(name = "jgmc")
    @ExcelProperty("机构名称")
    private String jgmc;

    @Id
    @Column(name = "jybm")
    @ExcelProperty("交易编码")
    private String jybm;

    @Column(name = "jypz")
    @ExcelProperty("交易品种")
    private String jypz;

    @Column(name = "mybj")
    @ExcelProperty("名义本金")
    private Double mybj;

    @Column(name = "gxzff")
    @ExcelProperty("固息支付方")
    private String gxzff;

    @Column(name = "fxzff")
    @ExcelProperty("浮息支付方")
    private String fxzff;

    @Column(name = "jycjr")
    @ExcelProperty("交易成交日")
    private String jycjr;

    @Column(name = "jyqxr")
    @ExcelProperty("交易起息日")
    private String jyqxr;

    @Column(name = "jydqr")
    @ExcelProperty("交易到期日")
    private String jydqr;

    @Column(name = "gxll")
    @ExcelProperty("固息利率（%）")
    private String gxll;

    @Column(name = "zfzq")
    @ExcelProperty("支付周期")
    private String zfzq;

    @Column(name = "lc")
    @ExcelProperty("利差")
    private Double lc;

    public void setYwyf(String ywyf) {
        this.ywyf = ywyf;
    }

    public String getYwyf() {
        return ywyf;
    }

    public void setJgmc(String jgmc) {
        this.jgmc = jgmc;
    }

    public String getJgmc() {
        return jgmc;
    }

    public void setJybm(String jybm) {
        this.jybm = jybm;
    }

    public String getJybm() {
        return jybm;
    }

    public String getJypz() {
        return jypz;
    }

    public void setJypz(String jypz) {
        this.jypz = jypz;
    }

    public Double getMybj() {
        return mybj;
    }

    public void setMybj(Double mybj) {
        this.mybj = mybj;
    }

    public String getGxzff() {
        return gxzff;
    }

    public void setGxzff(String gxzff) {
        this.gxzff = gxzff;
    }

    public String getFxzff() {
        return fxzff;
    }

    public void setFxzff(String fxzff) {
        this.fxzff = fxzff;
    }

    public String getJycjr() {
        return jycjr;
    }

    public void setJycjr(String jycjr) {
        this.jycjr = jycjr;
    }

    public String getJyqxr() {
        return jyqxr;
    }

    public void setJyqxr(String jyqxr) {
        this.jyqxr = jyqxr;
    }

    public String getJydqr() {
        return jydqr;
    }

    public void setJydqr(String jydqr) {
        this.jydqr = jydqr;
    }

    public String getGxll() {
        return gxll;
    }

    public void setGxll(String gxll) {
        this.gxll = gxll;
    }

    public String getZfzq() {
        return zfzq;
    }

    public void setZfzq(String zfzq) {
        this.zfzq = zfzq;
    }

    public Double getLc() {
        return lc;
    }

    public void setLc(Double lc) {
        this.lc = lc;
    }
}
